<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<h:form  rendered="#{currentUser.teacher}">
	<h:panelGrid columns="2" columnClasses="labelText, normalText">
		<h:outputText value="Zajecia" />
		<h:outputText value="#{eventCurrentBean.event.series.kind}" />
		<h:outputText value="Miejsce" />
		<h:outputText value="#{eventCurrentBean.event.place}" />
		<h:outputText value="Poczatek" />
		<h:outputText value="#{eventCurrentBean.event.startDate}">
			<f:convertDateTime pattern="dd-MM-yyyy HH:mm" />
		</h:outputText>
		<h:outputText value="Koniec" />
		<h:outputText value="#{eventCurrentBean.event.endDate}">
			<f:convertDateTime pattern="dd-MM-yyyy HH:mm" />
		</h:outputText>
	</h:panelGrid>
	<h:dataTable binding="#{eventCurrentBean.dataTable2}" value="#{eventCurrentBean.groups}" var="group" headerClass="tableHeader" styleClass="dataTable" rowClasses="oddRow, evenRow">
	<h:column>
		<f:facet name="header">
			<h:outputText value="Grupa" />
		</f:facet>
		<h:outputText value="#{group.groupName}" />
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="Temat projektu" />
		</f:facet>
		<h:outputText value="#{group.subject.topic}" />
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="" />
		</f:facet>
		<h:commandButton  value="Ocen grupe" action="#{eventCurrentBean.goToGroupMarks}" />
	</h:column>
	</h:dataTable>
</h:form>